//
// Created by ckxgz on 2021/6/3.
//
// 判断关系的对称性
#include <iostream>
#include <vector>

using namespace std;


// 是否对称
bool is_symmetric(vector<vector<int> > v)
{
    for (int i = 0; i < v.size(); ++i) {
        for (int j = 0; j <= i; ++j) {
            if(v[i][j] != v[j][i]) return false;
        }
    }
    return true;
}

// 是否反对称
bool is_anti_symmetric(vector<vector<int> > v)
{
    for (int i = 0; i < v.size(); ++i) {
        for (int j = 0; j < v.size(); ++j) {
            if(v[i][j] == 1 && i!= j && v[j][i] != 0) return false;
        }
    }
    return true;
}

int main()
{
    int n;
    cin>>n;
    vector<vector<int> > v(n);
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < n; ++j) {
            int t;
            cin>>t;
            v[i].push_back(t);
        }
    }
    if(is_symmetric(v) && is_anti_symmetric(v))
        cout<<"The matrix is antisymmetric and symmetric."<<endl;
    else if (!(is_symmetric(v) || is_anti_symmetric(v)))
        cout<<"The matrix is not antisymmetric or symmetric.";
    else if (is_symmetric(v))
        cout<<"The matrix is symmetric."<<endl;
    else cout<<"The matrix is antisymmetric."<<endl;
    return 0;
}
